home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_351 / pdc / libsrc.lzh / LibSrc / Math / min.c < prev    next >
C/C++ Source or Header  |  1990-04-07  |  2KB  |  60 lines

  1. /************************************************************************
  2.  *                                                                      *
  3.  *                              N O T I C E                             *
  4.  *                                                                      *
  5.  *                      Copyright Abandoned, 1987, Fred Fish            *
  6.  *                                                                      *
  7.  *      This previously copyrighted work has been placed into the       *
  8.  *      public domain by the author (Fred Fish) and may be freely used  *
  9.  *      for any purpose, private or commercial.  I would appreciate     *
  10.  *      it, as a courtesy, if this notice is left in all copies and     *
  11.  *      derivative works.  Thank you, and enjoy...                      *
  12.  *                                                                      *
  13.  *      The author makes no warranty of any kind with respect to this   *
  14.  *      product and explicitly disclaims any implied warranties of      *
  15.  *      merchantability or fitness for any particular purpose.          *
  16.  *                                                                      *
  17.  ************************************************************************
  18.  */
  19.  
  20. /*
  21.  *  FUNCTION
  22.  *
  23.  *      min   double precision minimum of two arguments
  24.  *
  25.  *  KEY WORDS
  26.  *
  27.  *      min
  28.  *      machine independent routines
  29.  *      math libraries
  30.  *
  31.  *  DESCRIPTION
  32.  *
  33.  *      Returns minimum value of two double precision numbers.
  34.  *
  35.  *  USAGE
  36.  *
  37.  *      double min (x, y)
  38.  *      double x;
  39.  *      double y;
  40.  *
  41.  *  PROGRAMMER
  42.  *
  43.  *      Fred Fish
  44.  *      Tempe, Az 85281
  45.  *
  46.  */
  47.  
  48. #include <stdio.h>
  49. #include "pml.h"
  50.  
  51. double min (x, y)
  52.         double x;
  53.         double y;
  54. {
  55.     if (x > y) {
  56.                 x = y;
  57.     }
  58.     return (x);
  59. }
  60.